import Vue from 'vue' // 引入vue
import VueRouter from 'vue-router'
import routes from "../config/routes.config"; //routes配置项
Vue.use(VueRouter) // 挂载vueRouter插件

const router = new VueRouter({
  linkActiveClass: "active", //定义路由激活类名
  routes //请前往config/routes.config.js配置
})

router.beforeEach((to, from, next) => { //前置导航守卫
  next();//放行
})

export default router